<?php

namespace app\shop\model\Vote;

use app\shop\model\BaseModel;

class Vote extends BaseModel
{
    protected $name = 'vote_vote';
    public function getImagesAttr($value): array
    {
        if ($value === '' || $value === null) return [];
        if (!is_array($value)) {
            return explode(',', $value);
        }
        return $value;
    }

    public function setImagesAttr($value): string
    {
        return is_array($value) ? implode(',', $value) : $value;
    }
}
